@import 'reset.css';

html,body {
  height: 100%;
}

body {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 16px;
}


#app {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: url('/bg-min.jpg') no-repeat;
  background-size: cover;
  overflow: hidden;
  .star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 1px whitesmoke, 0 0 2px whitesmoke;
    animation: starAnimate linear infinite;
  }
  .star:nth-child(even) {
    border: 1px solid #fff;
  }

  .text-wrap {
    color: transparent;
    font-size: 10vw;
    text-align: center;
    .text-row {
      &:first-child {
        margin-bottom: 10px;
      }
      li {
        display: inline-block;
        animation: textAnimate 3s linear infinite;
        animation-delay: calc(0.1s * var(--a));
      }
      .space {
        margin: 0 10px;
      }
    }
  }
  canvas {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
  }
  #music-trigger {
    position: absolute;
    right: 10px;
    top: 10px;
    width: 40px;
    z-index: 1;
    cursor: pointer;
    animation: 4s rorateAnimate linear infinite;
    animation-play-state: paused;
    &.playing {
      animation-play-state: running;
    }
  }
}

#audio {
  display: none;
}

@keyframes rorateAnimate {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes starAnimate {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  5% {
    opacity: 1;
  }
  50% {
    transform: translateY(2000%);
    opacity: 1;
  }
  95% {
    opacity: 1;
  }
  100% {
    transform: translateY(4000%);
    opacity: 0;
  }
}


@keyframes textAnimate {
  0% {
    color: #fff;
    filter: blur(2px) hue-rotate(0deg);
    text-shadow: 0 0 10px #00b3ff,
    0 0 20px #00b3ff,
    0 0 40px #00b3ff,
    0 0 80px #00b3ff,
    0 0 120px #00b3ff,
    0 0 200px #00b3ff,
    0 0 300px #00b3ff,
    0 0 400px #00b3ff;
  }
  30%, 70% {
    color: #fff;
    filter: blur(2px) hue-rotate(360deg);
    text-shadow: 0 0 10px #00b3ff,
    0 0 20px #00b3ff,
    0 0 40px #00b3ff,
    0 0 80px #00b3ff,
    0 0 120px #00b3ff,
    0 0 200px #00b3ff;
  }
  100% {
    color: transparent;
    filter: blur(2px) hue-rotate(0deg);
    text-shadow: none;
  }
}
